package Exercises;

import java.util.Scanner;

public class Task19 {

	public static void main(String[] args) {

		Scanner sc = new Scanner (System.in);
		int n = 0;
		int number = 0;

		while(true)
		{
			System.out.println("Please add a number: ");
		number = sc.nextInt();
		
		if (number<=100){
			System.out.println("Enter a number bigger then 100");
		}
			else {break;}
		}
		n = number;
		for(int i = 1; i <= 9; i++)
		{
			for(int j = 0; j <= 9; j++ )
			{
				for(int g = 0; g <= 9; g++)
				{
					int sum = ((i*100) + (j*10) + g);
					
					if (sum>n){ break; }
					if (i!=j && j!=g)
					{
						System.out.println(i+""+j+""+g);
					}					
				}
			}	
		}		
	}
}
